<script type="text/javascript">
	var forum_optionlist = <!--{if $forum_optionlist}-->'$forum_optionlist'<!--{else}-->''<!--{/if}-->;
</script>
<script type="text/javascript" src="{$_G['setting']['jspath']}threadsort.js?{VERHASH}"></script>

<!--{loop $quicksearchlist $optionid $option}-->
		<!--{eval $formsearch = '';}-->
        <!--{if getstatus($option['search'], 1)}-->
        	<!--{block formsearch}-->
            <span class="mtm z">
                <strong>$option[title]: </strong>
                <!--{if in_array($option['type'], array('radio', 'checkbox', 'select', 'range'))}-->
                    <span id="select_$option[identifier]">
                    <!--{if $option[type] == 'select'}-->
                        <!--{if $_G[gp_searchoption][$optionid][value]}-->
                            <script type="text/javascript">
                                changeselectthreadsort('$_G[gp_searchoption][$optionid][value]', $optionid, 'search');
                            </script>
                        <!--{else}-->
                            <select name="searchoption[$optionid][value]" id="$option[identifier]" onchange="changeselectthreadsort(this.value, '$optionid', 'search');" class="ps vm">
                                <option value="0">{lang please_select}</option>
                            <!--{loop $option['choices'] $id $value}-->
                                <!--{if !$value[foptionid]}-->
                                <option value="$id">$value[content] <!--{if $value['level'] != 1}-->&raquo;<!--{/if}--></option>
                                <!--{/if}-->
                            <!--{/loop}-->
                            </select>
							<input type="hidden" name="searchoption[$optionid][type]" value="$option[type]">
                        <!--{/if}-->
                    <!--{elseif $option[type] != 'checkbox'}-->
                        <select name="searchoption[$optionid][value]" id="$option[identifier]" class="ps vm">
                            <option value="0">{lang please_select}</option>
                        <!--{loop $option['choices'] $id $value}-->
                            <option value="$id" {if $_G[gp_searchoption][$optionid][value] == $id}selected="selected"{/if}>$value</option>
                        <!--{/loop}-->
                        </select>
                        <input type="hidden" name="searchoption[$optionid][type]" value="$option[type]">
                    <!--{else}-->
                        <!--{loop $option['choices'] $id $value}-->
                            <label><input type="checkbox" class="pc" name="searchoption[$optionid][value][$id]" value="$id" {if is_array($_G[gp_searchoption][$optionid]) && $_G[gp_searchoption][$optionid][value][$id]}checked="checked"{/if}>$value</label>
                        <!--{/loop}-->
                        <input type="hidden" name="searchoption[$optionid][type]" value="checkbox">
                    <!--{/if}-->
                    </span>
                <!--{else}-->
                    <!--{if $option['type'] == 'calendar'}-->
                        <script type="text/javascript" src="{$_G[setting][jspath]}calendar.js?{VERHASH}"></script>
                        <input type="text" name="searchoption[$optionid][value]" size="15" class="px vm" value="{if is_array($_G[gp_searchoption][$optionid])}$_G[gp_searchoption][$optionid][value]{/if}" onclick="showcalendar(event, this, false)" />
                    <!--{else}-->
                        <input type="text" name="searchoption[$optionid][value]" size="15" class="px vm" value="{if is_array($_G[gp_searchoption][$optionid])}$_G[gp_searchoption][$optionid][value]{/if}" />
                    <!--{/if}-->
                <!--{/if}-->
            </span>
            <!--{/block}-->
		<!--{/if}-->
    <!--{eval $formsearch_html .= $formsearch;}-->

	<!--{eval $fontsearch = '';}-->
	<!--{if getstatus($option['search'], 2)}-->
    	<!--{block fontsearch}-->
            <dt>$option[title]:</dt>
            <dd>
                <ul>
                    <li{if $_G['gp_'.$option[identifier]] == 'all'} class="a"{/if}><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_G['gp_sortid']&searchsort=1$filterurladd&$option[identifier]=all$sorturladdarray[$option[identifier]]" class="xi2">{lang unlimited}</a></li>
                    <!--{loop $option['choices'] $id $value}-->
                        <li{if $_G['gp_'.$option[identifier]] && $id == $_G['gp_'.$option[identifier]]} class="a"{/if}><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_G[gp_sortid]&searchsort=1&$option[identifier]=$id$sorturladdarray[$option[identifier]]" class="xi2"><!--{if $option[type] == 'select'}-->$value[content]<!--{else}-->$value<!--{/if}--></a></li>
                    <!--{/loop}-->
                </ul>
            </dd>
     	<!--{/block}-->
     <!--{/if}-->
     <!--{eval $fontsearch_html .= $fontsearch;}-->
<!--{/loop}-->

<!--{if $formsearch_html || $fontsearch_html}-->
<div class="bbs">
	<!--{if $formsearch_html}-->
        <form method="post" autocomplete="off" name="searhsort" id="searhsort" class="bm_c pns mfm {if $fontsearch_html}bbda{/if} cl" action="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_G[gp_sortid]">
            <input type="hidden" name="formhash" value="{FORMHASH}" />
            $formsearch_html
            <span class="mtm z"><button type="submit" class="pn pnc vm" name="searchsortsubmit"><em>{lang search}</em></button></span>
        </form>
    <!--{/if}-->
   	<!--{if $fontsearch_html}-->
        <dl class="bm_c ptm tsm cl">
             $fontsearch_html
        </dl>
    <!--{/if}-->
</div>
<!--{/if}-->